<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <title>订单列表</title>
    <link rel="stylesheet" type="text/css" href="__CSS__/api.css"/>
    <link rel="stylesheet" type="text/css" href="__CSS__/tt.css"/>
    <style>
        html, body {
            -webkit-touch-callout:default!important;
            /*-webkit-text-size-adjust: none;*/
            /*-webkit-tap-highlight-color: rgba(0, 0, 0, 0);*/
            -webkit-user-select:text!important;
            /*width: 100%;*/
        }
        * {
            /*-webkit-box-sizing: border-box;*/
            /*box-sizing: border-box;*/
            -webkit-user-select: text!important;
            /*-webkit-tap-highlight-color: transparent;*/
            /*outline: none;*/
        }
        .box{
            width:1180px;
            margin:40px auto;
            padding-top:32px;
        }
        .hidden {
            display: none !important;
        }
        .titleee{
            align-items: center;
            margin-bottom:32px;
        }
        .tit{
            font-size:14px;
            font-weight:400;
            color:rgba(51,51,51,1);
            padding-right:21px;
        }
        .tit_active{
            font-size:22px;
            font-weight:600;
            color:rgba(51,51,51,1);
        }
        .search{
            width:300px;
            height:36px;
            border-radius:4px;
            border:1px solid rgba(252,43,64,1);
            align-items: center;
            padding-left:16px;
        }
        .searchImg{
            width:16px;
            height:16px;
        }
        .search_btn{
            width:64px;
            height:37px;
            background:rgba(252,43,64,1);
            border-radius:4px;
            font-size:14px;
            font-weight:400;
            color:rgba(255,255,255,1);
            line-height:36px;
            text-align: center;
            position: relative;
            right: -1px;
            cursor: pointer;
        }
        input[type="text"]{
            height:36px;
            margin:0;
            padding:0 8px;
            font-size:14px;
            color:#333;
            background:transparent;
            outline: none;
        }
        input::-webkit-input-placeholder{
            color:#CCCCCC;
        }
        .card{
            width:1180px;
            overflow-x: auto;
            overflow-y: hidden;
        }
        .one{
            width:1566px;
            height:54px;
            align-items: center;
            background:rgba(250,250,250,1);
            font-size:16px;
            font-weight:400;
            color:rgba(51,51,51,1);
        }
        .tit1{
            width:104px;
            padding-left:48px;
        }
        .tit2{
            width:145px;
            padding-right:32px;
        }
        .tit3{
            width:84px;
            padding-right:32px;
        }
        .tit4{
            width:117px;
            padding-right:32px;
        }
        .tit5,.tit6,.tit9,.tit10{
            width:64px;
            padding-right:32px;
        }
        .tit7{
            width:112px;
            padding-right:32px;
        }
        .tit8{
            width:64px;
            padding-right:32px;
        }
        .tit11{
            width:112px;
            padding-right:32px;
        }
        .tit12{
            width:200px;
        }
        .one1{
            width:1566px;
            height:54px;
            align-items: center;
            background:#fff;
            font-size:14px;
            font-weight:400;
            color:rgba(51,51,51,1);
        }
        .blue{
            color:rgba(22,119,255,1);
        }
        .blue span{
            cursor: pointer;
        }
        .blue1{
            padding-right:24px;
        }
        .one2{
            width:1566px;
            height:54px;
            align-items: center;
            background:#FAFAFA;
            font-size:14px;
            font-weight:400;
            color:rgba(51,51,51,1);
        }
        .bottom{
            padding:56px 0 56px 100px;
        }
        .dr{
            width:64px;
            height:32px;
            background:rgba(250,250,250,1);
            border-radius:4px;
            border:1px solid rgba(221,221,221,1);
            font-size:14px;
            font-weight:400;
            color:rgba(102,102,102,1);
            line-height:32px;
            text-align: center;
            margin-right:444px;
        }
        .pageee{
            width:32px;
            height:32px;
            margin-right:8px;
        }
        .page{
            width:32px;
            height:32px;
            line-height:32px;
            text-align: center;
            background:rgba(255,255,255,1);
            border-radius:6px;
            border:1px solid rgba(221,221,221,1);
            margin-right:8px;
            font-size:14px;
            color:rgba(102,102,102,1);
        }
        .page_active{
            background:rgba(252,43,64,1);
            border-radius:6px;
            border:none;
            color:rgba(255,255,255,1);
        }
        #order,
        #about,
        #user {
            display: none;
        }
    </style>
</head>
<body>
{include file="public/header"}
<div class="box">
    <div class="titleee flex-wrap">
        <div>
            <span class="tit tit_active">我的订单列表</span>
            <span class="tit">进行中（{$num}）</span>
            <span class="tit">本周平均任务处理时间（25min）</span>
            <span class="tit">本周完成任务数（{$num1}）</span>
        </div>
        <div class="flex-con"></div>
        <form id="alls">
        <div class="search flex-wrap">
            <img src="__IMG__/search.png" class="searchImg">
            <input type="text" class="flex-con" id="mwwkey" name="search[]" value="{$search.0?:''}" placeholder="订单号|货物名称">
            <div class="search_btn">搜索</div>
        </div>
        </form>
    </div>
    <div class="card">
        <div class="one flex-wrap">
            <div class="tit1">序号</div>
            <div class="tit2">订单编号</div>
            <div class="tit3">出发地</div>
            <div class="tit4">目的地</div>
            <div class="tit5">运单状态</div>
            <div class="tit6">承运日期</div>
            <div class="tit7">货物名称</div>
            <div class="tit8">货物单位</div>
            <div class="tit9">结算方式</div>
            <div class="tit10">运费价格</div>
            <div class="tit11">备注</div>
            <div class="tit12">操作</div>
        </div>
        {if count($data)>0}
        {foreach name="data" item="vo"}

        <div class="one2 flex-wrap">
            <div class="tit1 aui-ellipsis-1">{:xuHao($key,$pages)}</div>
            <div class="tit2 aui-ellipsis-2">{$vo['order_num']}</div>
            <div class="tit3 aui-ellipsis-1">{$vo.go_sheng}{$vo.go_shi}</div>
            <div class="tit4 aui-ellipsis-1">{$vo.to_sheng}{$vo.to_shi}</div>
            {if $vo['order_type']==3}
            <div class="tit5 aui-ellipsis-2">发布中-需调整</div>
            {elseif $vo['order_type']==2 /}
                {if $vo['order_status']==5}
                  <div class="tit5 aui-ellipsis-2">进行中-待装货</div>
                {elseif $vo['order_status']==6 /}
                  <div class="tit5 aui-ellipsis-2">进行中-运货中</div>
                {elseif $vo['order_status']==7||$vo['order_status']==8||$vo['order_status']==9}
                  <div class="tit5 aui-ellipsis-2">待付款</div>
                {else /}
                    {if($vo['order_true']==3)}
                    <div class="tit5 aui-ellipsis-2">询价-待填价</div>
                    {else}
                    <div class="tit5 aui-ellipsis-2">询价-已填价</div>
                    {/if}
                {/if}
            {elseif $vo['order_type']==1 /}
                {if $vo['order_status']==5}
                  <div class="tit5 aui-ellipsis-2">进行中-待装货</div>
                {elseif $vo['order_status']==6 /}
                  <div class="tit5 aui-ellipsis-2">进行中-运货中</div>
                {elseif $vo['order_status']==7||$vo['order_status']==8||$vo['order_status']==9  /}
                    {if $vo['jiesuan']==2}
                    <div class="tit5 aui-ellipsis-2">已完成</div>
                    {else /}
                    <div class="tit5 aui-ellipsis-2">待付款</div>
                    {/if}
                {else /}
                     {if $vo['order_status']==1||$vo['order_status']==4}
                    <div class="tit5 aui-ellipsis-2">发布中-待确认</div>
                     {elseif $vo['order_status']==2  /}
                    <div class="tit5 aui-ellipsis-2">发布中-已确认</div>
                     {/if}
                {/if}
            {/if}
            <div class="tit6 aui-ellipsis-1">{$vo.order_zc_time}</div>
            <div class="tit7 aui-ellipsis-1">{$vo.order_goods_name}</div>
            <div class="tit8 aui-ellipsis-1">{$vo.order_goods_ton}吨</div>
            {if $vo['con_type']==1}
            <div class="tit9 aui-ellipsis-1">合同结算</div>
            {elseif($vo['con_type']==2) /}
            <div class="tit9 aui-ellipsis-1">现结</div>
            {elseif ($vo['con_type']==3)  /}
            <div class="tit9 aui-ellipsis-1">到付</div>
            {/if}
            <div class="tit10 aui-ellipsis-1">¥{$vo.order_freight}</div>
            <div class="tit11 aui-ellipsis-1">{$vo.order_intro}</div>
            <div class="tit12 blue">
                <span class="blue1" onclick="location.href='{:url('shop/order/detail1')}?id={$vo['order_id']}'">行程实况</span>
                <span class="blue1" onclick="location.href='{:url('shop/order/detail')}?id={$vo['order_id']}'">详情</span>
               {if $vo['order_status']==8}
                <span onclick="location.href='{:url('shop/order/comment')}?id={$vo['order_id']}'">评价</span>
                {/if}
            </div>
        </div>
        {/foreach}

        {else /}
        <div class="nooo">暂无数据</div>
        {/if}
    </div>

    <div class="bottom flex-wrap">
        <div class="dr" onclick="daochu()">导出</div>
       {$data->render()}
    </div>

</div>
</body>
<script type="text/javascript" src="__SCRIPT__/xydd.js"></script>
<script src="/static/admin/js/jquery.min.js"></script>
<script type="text/javascript">
    /*筛选*/
    $(".search_btn").click(function () {
        var data = $("#alls").serialize();
        window.location.href = '/shop/Order/index?' + data;
    });
    //导出:TODO
    function daochu() {
        var keyword = $('#mwwkey').val().trim();
        $.ajax({
            url: '/shop/order/daochu',
            type: "post",
            dataType: "json",
            data:{keyword:keyword},
            success: function (res) {
                if(res.code == 200){
                    //关闭加载层
                    // layer.close(loading);
                    location.href = (res.msg);
                }
            }
        });
//        location.href = '/shop/Order/daochu?keyword=' + keyword;
    }
</script>
</html>
